package com.ray.controller;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ray.service.WarehouseOutPrintTemplateService;
import com.ray.util.RequestUtil;
import com.ray.util.ResponseUtil;

/**
 * 出库给客户打印模板
* <p>Title: WarehouseOutPrintTemplateController</p>  
* <p>Description: </p>  
* @author 李斌  
* @date 2018年9月17日
 */
@Controller
@RequestMapping("/WarehouseOutPrintTemplate")
public class WarehouseOutPrintTemplateController {
	
	@Autowired
	WarehouseOutPrintTemplateService warehouseOutPrintTemplateService;
	
	@RequestMapping("/getWarehouseOutPrintTemplate")
	@ResponseBody
	public Map<String,String> getWarehouseOutPrintTemplate(HttpServletRequest request){
		Map<String,String> map = RequestUtil.getRequestAllParam(request);
		return ResponseUtil.ResponseResult(warehouseOutPrintTemplateService.getWarehouseOutPrintTemplate(map));
	}
	
	@RequestMapping("/addWarehouseOutPrintTemplate")
	@ResponseBody
	public Map<String, String> addWarehouseOutPrintTemplate(HttpServletRequest request){
		Map<String,String> map = RequestUtil.getRequestAllParam(request);
		warehouseOutPrintTemplateService.addWarehouseOutPrintTemplate(map);
		return ResponseUtil.ResponseResult("保存成功");
	}

}
